.class Lcom/netease/newsreader/activity/SelectCity$11;
.super Ljava/lang/Object;
.source "SelectCity.java"

# interfaces
.implements Landroid/view/View$OnTouchListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/activity/SelectCity;->initIndicator()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/SelectCity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/SelectCity;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    .line 386
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .locals 12
    .parameter "v"
    .parameter "event"

    .prologue
    const/4 v11, 0x1

    const/4 v9, -0x1

    const/4 v10, 0x0

    .line 389
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$2(Lcom/netease/newsreader/activity/SelectCity;)Lcom/netease/newsreader/adapter/CityGroupAdapter;

    move-result-object v7

    invoke-virtual {v7}, Lcom/netease/newsreader/adapter/CityGroupAdapter;->getCount()I

    move-result v7

    if-gtz v7, :cond_1

    .line 435
    :cond_0
    :goto_0
    return v11

    .line 392
    :cond_1
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v7

    packed-switch v7, :pswitch_data_0

    goto :goto_0

    .line 394
    :pswitch_0
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7, v9}, Lcom/netease/newsreader/activity/SelectCity;->access$15(Lcom/netease/newsreader/activity/SelectCity;I)V

    goto :goto_0

    .line 397
    :pswitch_1
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F

    move-result v7

    float-to-int v6, v7

    .line 398
    .local v6, y:I
    new-instance v4, Landroid/graphics/Rect;

    invoke-direct {v4}, Landroid/graphics/Rect;-><init>()V

    .line 399
    .local v4, r:Landroid/graphics/Rect;
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$9(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/LinearLayout;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v0

    .line 400
    .local v0, N:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_1
    if-ge v1, v0, :cond_0

    .line 401
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$9(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/LinearLayout;

    move-result-object v7

    invoke-virtual {v7, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v7

    invoke-virtual {v7, v4}, Landroid/view/View;->getHitRect(Landroid/graphics/Rect;)V

    .line 402
    invoke-virtual {v4}, Landroid/graphics/Rect;->centerX()I

    move-result v5

    .line 403
    .local v5, x:I
    invoke-virtual {v4, v5, v6}, Landroid/graphics/Rect;->contains(II)Z

    move-result v7

    if-eqz v7, :cond_3

    .line 404
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$16(Lcom/netease/newsreader/activity/SelectCity;)I

    move-result v7

    if-eq v7, v1, :cond_0

    .line 405
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7, v1}, Lcom/netease/newsreader/activity/SelectCity;->access$15(Lcom/netease/newsreader/activity/SelectCity;I)V

    .line 406
    if-nez v1, :cond_2

    .line 407
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$8(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/ListView;

    move-result-object v7

    invoke-virtual {v7, v10}, Landroid/widget/ListView;->setSelection(I)V

    .line 408
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$17(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/PopupWindow;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/PopupWindow;->dismiss()V

    goto :goto_0

    .line 410
    :cond_2
    invoke-static {}, Lcom/netease/newsreader/activity/SelectCity;->access$7()[Ljava/lang/String;

    move-result-object v7

    add-int/lit8 v8, v1, -0x1

    aget-object v2, v7, v8

    .line 411
    .local v2, letter:Ljava/lang/String;
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$2(Lcom/netease/newsreader/activity/SelectCity;)Lcom/netease/newsreader/adapter/CityGroupAdapter;

    move-result-object v7

    invoke-virtual {v7, v2}, Lcom/netease/newsreader/adapter/CityGroupAdapter;->getGroupPosition(Ljava/lang/Object;)I

    move-result v3

    .line 412
    .local v3, position:I
    if-eq v3, v9, :cond_0

    .line 413
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$18(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/TextView;

    move-result-object v7

    invoke-virtual {v7, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 414
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$8(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/ListView;

    move-result-object v7

    iget-object v8, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v8}, Lcom/netease/newsreader/activity/SelectCity;->access$2(Lcom/netease/newsreader/activity/SelectCity;)Lcom/netease/newsreader/adapter/CityGroupAdapter;

    move-result-object v8

    .line 415
    invoke-virtual {v8, v3}, Lcom/netease/newsreader/adapter/CityGroupAdapter;->getGroupViewPosition(I)I

    move-result v8

    .line 416
    iget-object v9, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v9}, Lcom/netease/newsreader/activity/SelectCity;->access$8(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/ListView;

    move-result-object v9

    invoke-virtual {v9}, Landroid/widget/ListView;->getHeaderViewsCount()I

    move-result v9

    add-int/2addr v8, v9

    .line 414
    invoke-virtual {v7, v8}, Landroid/widget/ListView;->setSelection(I)V

    .line 417
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$17(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/PopupWindow;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v7

    if-nez v7, :cond_0

    .line 418
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$17(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/PopupWindow;

    move-result-object v7

    iget-object v8, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v8}, Lcom/netease/newsreader/activity/SelectCity;->access$8(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/ListView;

    move-result-object v8

    .line 419
    const/16 v9, 0x11

    .line 418
    invoke-virtual {v7, v8, v9, v10, v10}, Landroid/widget/PopupWindow;->showAtLocation(Landroid/view/View;III)V

    goto/16 :goto_0

    .line 400
    .end local v2           #letter:Ljava/lang/String;
    .end local v3           #position:I
    :cond_3
    add-int/lit8 v1, v1, 0x1

    goto/16 :goto_1

    .line 431
    .end local v0           #N:I
    .end local v1           #i:I
    .end local v4           #r:Landroid/graphics/Rect;
    .end local v5           #x:I
    .end local v6           #y:I
    :pswitch_2
    iget-object v7, p0, Lcom/netease/newsreader/activity/SelectCity$11;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/SelectCity;->access$17(Lcom/netease/newsreader/activity/SelectCity;)Landroid/widget/PopupWindow;

    move-result-object v7

    invoke-virtual {v7}, Landroid/widget/PopupWindow;->dismiss()V

    goto/16 :goto_0

    .line 392
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method
